Subroutines
| Calls |
P |
F |
Exclusive Time |
Inclusive Time |
Subroutine |
| 0 | 0 | 0 | 0s | 0s | Hailo::::__ANON__[:43]Hailo::__ANON__[:43] |
Call graph for these subroutines as a
Graphviz
dot language file.
| Line |
State ments |
Time on line |
Calls |
Time in subs |
| 1 | | | | | |
| 2 | | | | | package Hailo; |
| 3 | | | | | |
| 4 | | | | | sub (;*) { |
| 5 | | | | | |
| 6 | | | | | # If we're inside a string eval, we can end up with a |
| 7 | | | | | # whacky filename. The following code allows autodie |
| 8 | | | | | # to propagate correctly into string evals. |
| 9 | | | | | |
| 10 | | | | | my $caller_level = 0; |
| 11 | | | | | |
| 12 | | | | | my $caller; |
| 13 | | | | | |
| 14 | | | | | while ( ($caller = (caller $caller_level)[1]) =~ m{^\(eval \d+\)$} ) { |
| 15 | | | | | |
| 16 | | | | | # If our filename is actually an eval, and we |
| 17 | | | | | # reach it, then go to our autodying code immediatately. |
| 18 | | | | | |
| 19 | | | | | goto &$code if ($caller eq $filename); |
| 20 | | | | | $caller_level++; |
| 21 | | | | | } |
| 22 | | | | | |
| 23 | | | | | # We're now out of the eval stack. |
| 24 | | | | | |
| 25 | | | | | # If we're called from the correct file, then use the |
| 26 | | | | | # autodying code. |
| 27 | | | | | goto &$code if ((caller $caller_level)[1] eq $filename); |
| 28 | | | | | |
| 29 | | | | | # Oh bother, we've leaked into another file. Call the |
| 30 | | | | | # original code. Note that $sref may actually be a |
| 31 | | | | | # reference to a Fatalised version of a core built-in. |
| 32 | | | | | # That's okay, because Fatal *always* leaks between files. |
| 33 | | | | | |
| 34 | | | | | goto &$sref if $sref; |
| 35 | | | | | |
| 36 | | | | | if (@_ == 0) { |
| 37 | | | | | return CORE::close(); |
| 38 | | | | | } |
| 39 | | | | | |
| 40 | | | | | if (@_ == 1) { |
| 41 | | | | | return CORE::close($_[0]); |
| 42 | | | | | } |
| 43 | | | | | Carp::croak("Internal error in Fatal/autodie. Leak-guard failure"); } |
| 44 | 1 | 6µs | | | ; |